/**
 * Generali Solutions d'assurances - Tous droits réservés &copy; 2007 - 2010
 */

package fr.generali.accueilclient.opt.recherchemulticriteres.builder;

import fr.generali.accueilclient.opt.recherchemulticriteres.om.ICriteresIssueRechMultiCriteres;
import fr.generali.accueilclient.opt.recherchemulticriteres.om.impl.DTOCriteresIssueRechMultiCriteres;

/**
 * @author Holmes Kelly
 */
public class DTOCriteresIssueRechMultiCriteresBuilder extends
                DTOCriteresIssueRechMultiCriteresBuilderBase<DTOCriteresIssueRechMultiCriteresBuilder> {

    /**
     * DTOCriteresIssueRechMultiCriteresBuilder
     */
    public DTOCriteresIssueRechMultiCriteresBuilder() {
        super(new DTOCriteresIssueRechMultiCriteres());
    }

    /**
     * @return DTOCriteresIssueRechMultiCriteresBuilder
     */
    public static DTOCriteresIssueRechMultiCriteresBuilder dTOCriteresIssueRechMultiCriteres() {
        return new DTOCriteresIssueRechMultiCriteresBuilder();
    }

    /**
     * @return DTOCriteresIssueRechMultiCriteres
     */
    public ICriteresIssueRechMultiCriteres build() {
        return getInstance();
    }
}

/**
 * @author Holmes Kelly
 * @param <GeneratorT>
 */
class DTOCriteresIssueRechMultiCriteresBuilderBase<GeneratorT extends DTOCriteresIssueRechMultiCriteresBuilderBase<GeneratorT>> {

    /**
     * instance
     */
    private ICriteresIssueRechMultiCriteres instance;

    /**
     * @param aInstance instance
     */
    protected DTOCriteresIssueRechMultiCriteresBuilderBase(ICriteresIssueRechMultiCriteres aInstance) {
        instance = aInstance;
    }

    /**
     * @return instance
     */
    protected ICriteresIssueRechMultiCriteres getInstance() {
        return instance;
    }

    /**
     * @param aValue issue opportunite
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildIssueOpportunite(String aValue) {
        instance.setIssueOpportunite(aValue);

        return (GeneratorT ) this;
    }
}
